from AIAssistant import AIAssistant
class TranslationAssistant(AIAssistant):
    """子类：翻译助手"""

    def __init__(self, aid: str, name: str, version: str, is_online: bool, ability_score: int,
                 supported_text_types: str):
        super().__init__(aid, name, "翻译", version, is_online, ability_score)
        self.supported_text_types = supported_text_types

    def execute_task(self, task_content: str) -> str:
        return f"[{self.get_name()}] 执行翻译任务：\n原文：{task_content}\n翻译结果：（已完成翻译，支持语言对：{self.supported_text_types}）"

    def get_supported_text_types(self) -> str:
        return self.supported_text_types

    def set_supported_text_types(self, supported_text_types: str) -> None:
        self.supported_text_types = supported_text_types

    def __str__(self) -> str:
        return super().__str__() + f", 支持语言: {self.supported_text_types}"